replace getResources by resources variable
update JavaDoc