pasted in scripts from demo source