Outlined the pseudocode needed