updated awk script