logic debug