wrote pseudocode