main code updated

updated the main code entry point section to have have all the required
function calls in order as well as a console.log() call after each
function call as required by the flowchart