Hide pairs optimization