fix #8
fix #6
fix #7