Working example of passing row index