simulationforstaack with casts