use 'const void * data' in signature to avoid excessive casting at the call site