added middleware and registered new models with admin