use string_types from six instead of basestring