reworked and added client