added additional test case
smarter attribute string handling
simplifying