optimize resource class