Integrated Scott's code and added function stubs for the naive and view methods