updated height and autoheight calculations