Modifiying pseudo code