added responseMsg checks