Added events funcionality