Added comment for randomAction() function