folded private method into public rest method