more unit testing, close #95