replace onResponseOf in most parts of the code