refactor to separate demostration