Added support for parallel processing