create skip_available function and use it in regtest