added full functionality of crud model