Added a bit of clarity, made intermediate index var to pretify.