completed create and delete for tags
added delete function
changed to use defer w.Flush()