remove redundant variables