crud middleware specifically for mongoose