changed typedefs to void * to casting isn't necessary