Updated with new APIs