local server code added