Add 'with' method for put function