included javadoc and simplified demo