removed check_fun to check_function