finish type checking