Added pseudocode
Added pseudocode