working on general graph script