added the comments and fixed the random operators part