add better typing to simulate functions