added event add function