more refactor of random class