graph class is not template anymore