moved code to client and server folder