running functionality, added comments, and changed naming conventions