use ServiceConfig instead of Factory classes