bfs.h and mods