main.rb - added more maths