refactor project in client and server