debug Seclect function