improved RestInflector method