Fixed bug, finished with part 3