finished type checking