simplify random paper code

it will run faster now that we have an index on references_count > 0