append correct html to table