implementation using SplObjectStorage