refactoring and adding boundary zipping initial support
refactorings