sorting services in info based on inbound and outbound dependencies