fix pseudocode