Add function to topic.html