fix base on the comments

* fix pep257 warning
* use max instead if nlargest