added detail view and delegate