- minor refactoring
- patial fixes