changed height function