move func to config module