fine tuning the apply settings script