fixed up prelude and checking of types