Adding method to create tasks