move demo function to own file