start to write settings func.