adding get_height_diff function