modified for new resource def schema