debugging and tests