Second attempt to solve the string calculator