edit index and partial to receive local variable