parallax effect on changing background not working

ok i had a parallax effect on my background, i then wanted to change the material dynamically in a co routine when i did i got some unwanted behaviour (flickering) turns out it was my error and a guy from here noticed it, let me know and now it works just fine for changing the material, however ive lost the parallax effect, ive tried calling it from various parts of my script and adding functions to help do it but nothing seems to work (although im new to all of this so hopefully its a quick fix)
here is what im doing for the paralax effect (followed a tutorial on youtube)

 void Update () {
    go();

}

public void go()
{
    pos += speed;
    if (pos > 1.0f)
        pos -= 1.0f;
    GetComponent<Renderer>().material.mainTextureOffset = new Vector2(pos, 0);
}

and to change the material in my co routine im doing this

// Use this for initialization
void Start () {
    current = this;
    GetComponent<Renderer>().material = mat1;
    StartCoroutine(MyCoroutine());
}

IEnumerator MyCoroutine()
{
    GetComponent<Renderer>().material = mat2;
    yield return new WaitForSeconds(2.8365f);
    GetComponent<Renderer>().material = mat1;
    yield return new WaitForSeconds(2.8365f);
    StartCoroutine(MyCoroutine());
}

i did put the get component calls in there own function but this seems to make no difference, ive tried calling my go() function in the co routine and all around it lol but no joy can anyone point out or point me in the direction i should be taking
many thanks for any and all suggestions
ps: yes i know 2.8635 is random its taken a lot of trial and error to get there too lol

okay i got this to work and for anybody trying a similar thing this script below will work attach it to whatever youd like to paralax the materials are setable in the editor and so is the direction so for instance mine shows a material parallaxing upwards and after a few seconds it changes material and parallaxes right to left maybe itll help someone

using UnityEngine;
using System.Collections;

public class simpleScroll : MonoBehaviour
{

    public float scrollSpeed;
    public float tileSizeZ;

    private Vector2 savedOffset;
    private Vector3 startPosition;

    [SerializeField]
    public Vector3 direction;
    [SerializeField]
    public Material mat1;
    [SerializeField]
    public Material mat2;
    public static simpleScroll current;

    void Start()
    {
        current = this;
        StartCoroutine(MyCoroutine());
        startPosition = transform.position;
        savedOffset = GetComponent<Renderer>().sharedMaterial.GetTextureOffset("_MainTex");
    }
    IEnumerator MyCoroutine()
    {
        GetComponent<Renderer>().material = mat2;
        direction = Vector3.forward;
        yield return new WaitForSeconds(2.8365f);
        GetComponent<Renderer>().material = mat1;
        direction = Vector3.up;
        yield return new WaitForSeconds(2.8365f);
        StartCoroutine(MyCoroutine());
    }
    void Update()
    {
        scrollUp();
    }
    void scrollUp()
    {
        float x = Mathf.Repeat(Time.time * scrollSpeed, tileSizeZ * 4);
        x = x / tileSizeZ;
        x = Mathf.Floor(x);
        x = x / 4;
        Vector2 offset = new Vector2(x, savedOffset.y);
        GetComponent<Renderer>().sharedMaterial.SetTextureOffset("_MainTex", offset);
        float newPosition = Mathf.Repeat(Time.time * scrollSpeed, tileSizeZ);
        transform.position = startPosition + direction * newPosition;
    }


    void OnDisable()
    {
        GetComponent<Renderer>().sharedMaterial.SetTextureOffset("_MainTex", savedOffset);
    }
}