update psuedocode
fix spelling mistakes #1