repetitive checks of responseCode