Added Psudocode