use six.string_types for python2 compat