debugging and calibrating