added wrapper function
added documentation