added MAX_RETRIES variable