added setting's file, fixed some bugs