this is cloned from the original kaldi svn rep