fixing void pointer errors