implemented method for rest put