better app handling