wrote basic working version of analytics tool