random assign of instances