changed graph slightly to accept larger numbers