restruct pair class