added random assignment