remove redundant variable insertion