added height function