simplified method name for clarity
we actually want an integer, not a double
finally generates a correct answer! but took 15 minutes, which is a bit too long
cosmetics