changed one variable so wouldnt be redundant
removed unused var