Added country detector functionality