remove nested re or; opt loop