change code for new sdk