picked up prettytable formatting from https://gist.github.com/russellb/5082605