write command to calculate top tags