Updated algorithm for measureHeight


Signed-off-by: ElishaG <elishajeremy.gonzales@gmail.com>