Worked on simulation routine, still not done