First working version of summarize.sh