hooking into a better timed event
more flexible markup output