Fixxed condition check in calc.rb