added index and got store to swap out properties of object