tried first approach at iterating over rows, definitely not very good yet