compatible with client and server