refactor App