Correct the pseudocode