merged client and server