Added some pseudocode.