fix minor bugs && actualization the code