implemented working version for the app