changed rows cols api to multiple arguments / return values instead of arrays