change codes for plain server