initialise task using dependencies