added example usage
added some javadocs