parseFloat method was meant to be parseInt method.