separated code into client and server directories