half-way through integrating docs client-side api.