clever autoconfigure