added user input for dimension and randomizing