added code to generate random pictures
added defscript written by Andrew Zonenberg