Partially finish lab1. Sometimes race conditions occur in last test case.