Simplify program logic