Use class() instead of structure() for speed