adjusting to API change