add view method to file