Clean version of #2

fix #2