Source code for the part 2
Minimal changes