fixed bug & add some methods