Setting up the simulation