add tests for edge cases; change object name encode, close #15