updating Interpret module to use Result monad operator