use double rather than float