worked on functions in client.rb and debugging