added Net monad using ReaderT to eliminate explicit passing of socket handle