removed nlm call for quadratic forms, changed tolerance for positive
definiteness