checks and debugging