Updated to match new API