0.2c

improve template format function
Todo: the js format function