#3224 fixed function name and added some javadoc.