implemented generic graph structure