adding function to create tasks