keep working on #22
fix #22, effort 8 hrs