type checking appears to be working