almost completed printList template and javascript replacement