generate model, retun array