adding math server code