branch of kadrlica's dsphs code from CVS