moves config to rc and supports multilevel