Debugged adding tasks functionality