refactored app succesfully