made tests work on client and server side