change parseInt to Math.round