the client-side code for telepaint