working on random generation