added some pseudocode for the main algorithm