Converted top down bfs to parallel for