generation from array