performance improvements to simulate_phenotypes