added rand method
images can now be added to events created via ajax