added initial values for rand