Updated pseudocode to reflect this week's changes.