integrate server code