PDP hw2 with parsing