Changes to event processor in logic to add events.

Fixed the problem with cost modification