reworked client for new server side api