refactor - improve test_sim