Added server Code and Chages
corrected autostop bug