update simulations, add optimizer code