bdys refactor