part of code moved to demo module