tidy up and event validation