added more psuedocode.