final submission. cleaned up code, added comments, etc