testing I/O stuff from haskell lecture 8