implemented java.io.Serializable in graph elements