reorganize code , add ServiceInfo