refactoring & packaging