implementing event tracking