checked and removed ghc warnings