Modified the main method of BFS. Added code for executing number of threads