Removed unused function 'randNum'