Added the logic of the app