add some comments. add functionality for finding loops and checking types of variables inside the loops; make check_all_module and check_function more generic, to handle either kind of checking.