cut out unneccessary BFSs