correct pseudo code example