removed redundant variables