added more java doc and fixed spelling error