change accums from float to double to improve precision