implemetation of workflow