reworked prototype to use real CAS client