specify function(i)

probably necessary - works either way