fixed tag lookups and added comments (nw)