simplify client.js, less confussion