update to be compatible with py2.7.7