Event functionality added