change getServices() to getInstances(), and getDefs() to getServices()