fix #4
fix #3
fix #8