fixed #7 add tests