updated to use v3 API