type checking, maybe even works