Completed Uniform generation function + Commenting