calculator that reads a string