added rspec
updated for floating point
updated for floating point