debug and integrate