Changed view get data method to be public