Part 2 with some bugs