evalScheem function that can correctly handle multiplication and division