design and bug fix