separate rest service from UI