Added Documentation 
Added Random number logic for last resort