add middle service and service dependencies