shortened the standardizeTypes function