add the condition else if to execute the condion of kid height with a parent present minimum height