decompose for parallel processing

comes with example