Hackup done in order to create a graph (algorithm has to be modified drastically)
Removed unused array