refactored and improved bit bucket performance
refactored and improved bit bucket performance