fix bug & improved