optimizations and test for no attributes