refactor christmas_tree.js