added modified BB class