porting over python version (2.2)