moved demo-code to demo-file