separated config to function