the value can now be a function
the passed funciton now takes the index
updated info to reflect that you can pass a funciton