refactoring to BS3