doc format + event registration with decorator