implemented simulate method