Added Pseudocode