added parallel computing