moved router around to make services work after res is modified