refactored brr