added a random mechanism to the main header