changed everything from float to double