moved function out to separate client
added proper reactive client