fix build, use pointers everywhere