working version with new specific api