cleanup and simulation differentiation