Updated to new resource api
Updated to new resource api