refactor simulate
refactor simulate