Working solution for P2 implemented
Pseudocode(ed) solution
Added working function solutions