Modified pseudocode