compiling part 3 code