moved some demo code to separate files