implemented client and some server tests