refactored services definition to xml format