pulled out the row parsing into methods