refactor to demo project