working version of client