testing entropy method with gradient rather than newton method, update method with new matrix generation code, minor cleanup