added graph structure, need searching alg and cleaner code