Update requestAndCheck function