java doc example, need to add more concrete examples/comments for code