add missing docstring, fix underindent and error message style