refactored app server