now using simulate keys instead of direct function calls