First implementation of client functionality