make /rest the root path
refactor