add some config logic