example updated to clarify type detection