[WIP] first and UNTESTED port to the latest SDK