Updated main with logic to start