added config saving