switch from typeof to the more portable __typeof__