tweaked rand interface and added collection tests
changed all permissions to 755 (sorry!)