Added more pseudocode.