code for tracker simulation