moved code to RestServer