Updated code to become more real (word replacement works based on event model)