experiment improved, new graph structure (GraphB) uses hashmaps instead of arraylist