add iteration methods to variables

Added iteration method to variable objects.