Updated with the new API.