Migration to the new API