Added some pseudocode