updated client, added tests