fix the bug from chenyinghou, add java doc, add a map to explain each
feature