updates reader monad