use a QSharedPointer to allow for more elegant assignment cleanup