add check_defined function to initial global variable