fixed #44 design and bug fix