added javadoc
added arrays