some pointer stupidity that I'm impressed worked before this