fix bugs and add some files