edit events functions