modify feature saving format and minor changes of coding