rows is not a function