minor changes to index and callback