added client classm, improved client library