first version of client handler done