Starting the main flow

latest working code