sequential code updated, parallel code needs minor debugging