recoding for changes to API