added lab2, which is my unsuccessful attempt to redo the code (the submitted version will work on the first go, but continuous attempts might fail).