debugged algorithms