fixed bug where comma was messing up calculation