added the function for adding new event record