Removed unnecessary random function