better error handling
make NSCopying compliant so that it can be used as dictionary key