format doc and code