separated country and region and tidied up code