AWK implementation with associative-array
AWK implementation for ordered data
refactoring