assignment 4 for SEG for concurrency