* Finished rewrite with GHC IO Encoding