deviceServer code sprint2