make use of javascript templates