Updated for latest sdk