working on bb refactor