major revision to client and server API by introducing $N