updated random selection section and added comments