changed approach for object randomization.