split out functions into demo namespace