compatible with ghc-7.6
fix indent
simplify