updated to match the latest sdk
fixed var name