updated the code to support njaal server