New event displacement code working