refactor show.js