Improved calculator to return a the single number, not just return 1
added test case for new lines