improved task adding functionality