Working simulation with example inputs