refactored math.floor
add 4 different loops