simplify the program logic.