some logic for adding a new task