changed commands to use smarter awk