Pass key and value to vars method