fix #6; fix #8
fix #9