use correct index function, call relevant memory dealloc, bump version no