pseudo code update