type checking is now a callback