added server response handling
merged