working? BF algo