added height change handling