added dynamically generating surrogate graphs