added graph support