reformating and introduce tests for #1 issue
fix #1
Merge pull request #2 from bolgovr/fix_1

Fix 1