committing breadthfirst as well as some mods to the others