add pimpl idiom
enhance test driver