Update Pseudo code for Main