Completed assignment 3, added a few extras