different approach - wipe out old code
extract typedefs