fixed issue #4 & more tests