comments on legalizetypes.cpp