refactoring
refactoring and fixes
v0.6.4