type checking mostly donw