added code for simple random submission