refactoring - getting ready for record and playback of events