added tests, modified docs, improved error handling on wrong tag names