added parallel processing