ack function with docstring added
if __name__ == '__main__': added to code
all tests pass for m > 3.
RuntimeError when m > 3