update structure to API2.0
update code to APIv2.0