added missing Math.floor