refactor show resource
reverse code