the client side code of agreement creator