provide both apis to client and server
dito