added tests & example client code.