update javadoc for Tag
fix bug where max method was actually returning the min
add min method for numbers