initialize method for task