restructuring of worker
added integration of pattern