some styles
fixed bug with tagname not being used
better error handling
before and after