Tested, works for serial, not yet for parallel