only available in python 2.7 onwards - please fix to make compatible with 2.6