[lib] add formatting