Copied wrapper code from Oceans repo