rst: added working rst segment extraction