Updated naive method to use pointers. Test this!