initial commit for modelu function for variable number of species