type checking now fixed