replace basestring with strtypes