use better method to handle settings