added gatesimulation