python2.7 backward compatibility working