Create function for create tasks