added variables to graph creating for greater controll