I add the pseudo code