added script for 'stats' tool - fix #160