working version of client.go