redundant variables removed