graphs improved working