updated with javadoc