parsing rows correctly