refactoring and small api changes
v0.3.0