added check for abs(height) > 0