don't use indexOf as it is incompatible with oldIE