refactored to have client and server folders