second attempt at analytics