make retrieve function to monad