make func to choose variable and year