dual typing modes
added documentation
add documentation