update view based on variable name