Add condition to check if return value is less than 0