switches instance variables to an array