fixed random number problem and added graph lables