Added view or edit functionality