turned out import of Control.Monad.Error was not extraneous, so readded it; changed type of 'main' to IO (); altered 'output' to use 'putChar' instead of 'print' for more readable output