added a better javadoc