add main program logic