Same comment as elsewhere. You can collapse this pattern by making readOneRecord() return the current record, since this is how you use it everywhere