Using Ruby to do math