The debugged version