remove redundant variable in the views