changed to mustache template
slight refactor