updated builder function in mainSim1