working on event flow