added detail view and completed switch functionality for more generic
solution