add a little documentation for js