added functionality for displaying and editing data