fixed bug relating to the type of the numbers (converted an int to a double, so it would divide properly