debug the new logic