iOS-tut Assn4: added a lot of code that I might throw out