use var for country_id
use ternary
no need for a begin end