generating random objects repaired