refactor show functions