changed the structure of the model layer