use a common function/fun with awk