fix #8
fix #7
update for #9