updated design, refacttored client