update function comments for javadoc