close #1
added tests