Changed value of scan_names function