Added random charge generation