refactored bufferbid