refactor show resource