refactoring form for adding tasks