inprovement and bug fix