add fields() function to Event class to get all the fields of it