move to python 3
fix some awk syntax problems