Untested, but hopefully working client.js