fix #9,#10 . finish #7