config logic