refactored demos