more test and some javadoc