add docs to show how to apply a function rowwise