added a writeHTML function to links.py