implementing simulator