some javadoc added;
hash method moved to triangle;