minor corrections to likelihood func