migrating algorithms to be more general
a working bfs and bloxorz