js example will replace scala template