refactoring

use Pimpl idiom