working on Client side, not finsihed yet