added lsopt changes (left out of previous committ)