moved this check into the resource