some small improvements to CCRandom