use resource
refactor