added the user id and index to events