update to use awk better