final code submission, added automated simulations and better comments