Added proper pseudocode

make note of which are yours to do