finish user random function