removed redundant variables.