serverside of copaint