add testing code and refine Class: Setting