adding view function for collection