refactor BS