added the main program for stage one