try algo with debug