adding automatic event