Event addition code in UI works