changed the detail view to show data from the database