move the <tag>-handler code into a map