added more type checking rules