created a method checkLinksRandomnessAndEffect