Function for height of an object