implemented stop app functionality