add kill server code to project