now fully working with latest api