simplified rest code