made calculator to handle an empty string