work on values of $cfg only