initial implementation of client.