accounted for block heights. refactored move.