take the last height into consideration