added code for old graphs package