nearly finish the refactor with bs3