add some client-side code