restructure of models