added pytho2.5 compatibility