Docstrings and return value

Comments for methods should be docstrings.

Added return value in check5() outside loop.