refactoring for demo setup