use when and fix indentation problem
add doc of clos parse and encode
forget to commit doc.html