simplify stuff a bit (don't pass void* pointers)