checkpoint before refactor of type handling