replace math.round by math.floor