Updated with new API