Downdated to run on python 2.6