start translating api events into html output