reformat and support python3.4