add some server side code