testing, sim function not working well