Changed the basic algorithm of the application.