Added condition to check last name.
Imported random class.