Is there a way to pattern match into a variable name