added documentation
minor function name change