moved work flow to method