getter and setter in graph