get rid of redundant variable