Modified mainProgram file