Those exception and the row*number ... is what needs to be dried up. It already in the get_element method and should only appear once in the code.