simplified awk expression, fixed unit test