clean up a bit - remove indexed and give update fn comp a better name