wrapping graph class in function wrapper