floor_to = function(n, base) return math.floor(n/base)*base end