use stripPointerCasts to simplify some code.